package com.lovegu.object.up;

/**
 * @author 老顾
 * @title: TransferTest1
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/9/20 17:22
 */
public class TransferTest1 {
    public void swap(int a, int b) {
        int tmp = a;
        a = b;
        b = tmp;
        System.out.println("swap方法里，a的值是" + a + "；b的值是" + b);
}
    public static void main(String[] args) {
        TransferTest1 test = new TransferTest1();
        int a = 5;
        int b = 10;
        test.swap(a, b);
        System.out.println("交换结束后，变量a的值是" + a + "；变量b的值是" + b);
    }
}
